<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="../../layui/css/layui.css" media="all" />
    <link rel="stylesheet" href="../../css/public.css">
</head>

<body class="tbody">
    <!-- 编辑奖品按钮里面的奖品界面-->
    <form class="layui-form layui-form-pane layui-container layui-col-space10" lay-filter="dataform">
        <input type="text" class="layui-input" autocomplete="off" name="id" style="display: none;">
        <div class="layui-col-xs12">
            <div class="layui-form-item">
                <label class="layui-form-label">概率</label>
                <div class="layui-input-block">
                    <input type="text" class="layui-input" autocomplete="off" lay-verify="number" name="odd"
                        placeholder="请输入概率">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">基数</label>
                <div class="layui-input-block">
                    <input type="text" class="layui-input" autocomplete="off" lay-verify="number" name="base"
                        placeholder="请输入基数">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">奖品等级</label>
                <div class="layui-input-block">
                    <input type="text" class="layui-input" autocomplete="off" lay-verify="number" name="prize_level"
                        placeholder="请输入奖品等级(1-7)">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">奖品数量</label>
                <div class="layui-input-block">
                    <input type="text" class="layui-input" autocomplete="off" lay-verify="number" name="amount"
                        placeholder="实际用于抽奖的数量">
                    <div class="tips">该属性只在所选商品不限库存时生效</div>
                </div>
            </div>
            <div class="layui-form-item">
                <table id="tableList" class="layui-table" lay-filter="tableList" lay-skin="line" style="height:353px;"
                    lay-data="{url:baseUrl('goods/select'), cellMinWidth: 150, id: 'tableListTable', page:true, limits: [ 30, 50, 100],limit: 30}">
                    <thead>
                        <tr>
                            <th lay-data="{field:'name'}">商品名称</th>
                            <th lay-data="{width: 80, templet: '#templet_repertory'}">库存</th>
                            <th lay-data="{width: 80,templet: '#tableListBar'}"></th>
                        </tr>
                    </thead>
                </table>
                <!--模板-->
                <script type="text/html" id="templet_repertory">
                    {{# if(d.repertory_type) { }}
                    无限
                    {{# }else{ }}
                    单件
                    {{# } }}
                </script>
                <script type="text/html" id="tableListBar">
                    <a class="layui-btn layui-btn-xs" lay-submit="" lay-filter="save" lay-event="select">选择</a>
                </script>
            </div>
        </div>
    </form>
    <script type="text/javascript" src="../../layui/layui.js"></script>
    <script type="text/javascript" src="../../js/jsCtl.js"></script>
    <script type="text/javascript" src="addPrize.js"></script>
</body>

</html>